<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilasu: AES Common APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilasu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xasu__aes__common__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">AES Common APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga9caf443e3e977676111d41dbe2fe35db"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__aes__common__apis.html#ga9caf443e3e977676111d41dbe2fe35db">XASU_AES_IS_AAD_SUPPORTED_MODE</a>(EngineMode)</td></tr>
<tr class="memdesc:ga9caf443e3e977676111d41dbe2fe35db"><td class="mdescLeft">&#160;</td><td class="mdescRight">This macro checks if AAD processing is allowed for the given AES engine mode.  <a href="#ga9caf443e3e977676111d41dbe2fe35db">More...</a><br/></td></tr>
<tr class="separator:ga9caf443e3e977676111d41dbe2fe35db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf650e5321d4f5e9d5e3af59d9690cd15"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__aes__common__apis.html#gaf650e5321d4f5e9d5e3af59d9690cd15">XAsu_AesValidateIvParams</a> (u8 EngineMode, u64 IvAddr, u32 IvLen)</td></tr>
<tr class="memdesc:gaf650e5321d4f5e9d5e3af59d9690cd15"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function validates the IV parameters for the specified AES engine mode.  <a href="#gaf650e5321d4f5e9d5e3af59d9690cd15">More...</a><br/></td></tr>
<tr class="separator:gaf650e5321d4f5e9d5e3af59d9690cd15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga46d86db456797e1245906452022c98eb"><td class="memItemLeft" align="right" valign="top">s32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xasu__aes__common__apis.html#ga46d86db456797e1245906452022c98eb">XAsu_AesValidateTagParams</a> (u8 EngineMode, u64 TagAddr, u32 TagLen)</td></tr>
<tr class="memdesc:ga46d86db456797e1245906452022c98eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API Validates the tag parameters for the specified AES engine mode.  <a href="#ga46d86db456797e1245906452022c98eb">More...</a><br/></td></tr>
<tr class="separator:ga46d86db456797e1245906452022c98eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga9caf443e3e977676111d41dbe2fe35db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XASU_AES_IS_AAD_SUPPORTED_MODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">EngineMode</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">(((EngineMode) == <a class="code" href="group__xasu__common__defs.html#ga266c9d8c0ac689bdb49cbb5cd0d293f9">XASU_AES_GCM_MODE</a>) || \</div>
<div class="line">        ((EngineMode) == <a class="code" href="group__xasu__common__defs.html#gacc3bdb18dc3dd63126c7088ba676ada1">XASU_AES_CMAC_MODE</a>) || \</div>
<div class="line">        ((EngineMode) == <a class="code" href="group__xasu__common__defs.html#ga30d8f9306c9e8a365a92247259db30db">XASU_AES_CCM_MODE</a>))</div>
<div class="ttc" id="group__xasu__common__defs_html_ga30d8f9306c9e8a365a92247259db30db"><div class="ttname"><a href="group__xasu__common__defs.html#ga30d8f9306c9e8a365a92247259db30db">XASU_AES_CCM_MODE</a></div><div class="ttdeci">#define XASU_AES_CCM_MODE</div><div class="ttdoc">AES CCM mode. </div><div class="ttdef"><b>Definition:</b> xasu_aesinfo.h:82</div></div>
<div class="ttc" id="group__xasu__common__defs_html_ga266c9d8c0ac689bdb49cbb5cd0d293f9"><div class="ttname"><a href="group__xasu__common__defs.html#ga266c9d8c0ac689bdb49cbb5cd0d293f9">XASU_AES_GCM_MODE</a></div><div class="ttdeci">#define XASU_AES_GCM_MODE</div><div class="ttdoc">AES GCM mode. </div><div class="ttdef"><b>Definition:</b> xasu_aesinfo.h:83</div></div>
<div class="ttc" id="group__xasu__common__defs_html_gacc3bdb18dc3dd63126c7088ba676ada1"><div class="ttname"><a href="group__xasu__common__defs.html#gacc3bdb18dc3dd63126c7088ba676ada1">XASU_AES_CMAC_MODE</a></div><div class="ttdeci">#define XASU_AES_CMAC_MODE</div><div class="ttdoc">AES CMAC mode. </div><div class="ttdef"><b>Definition:</b> xasu_aesinfo.h:84</div></div>
</div><!-- fragment -->
<p>This macro checks if AAD processing is allowed for the given AES engine mode. </p>

<p>Referenced by <a class="el" href="group__xasu__aes__client__apis.html#ga48dae63bdd6476ad22853140b0b23e9a">XAsu_AesOperation()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaf650e5321d4f5e9d5e3af59d9690cd15"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 XAsu_AesValidateIvParams </td>
          <td>(</td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>EngineMode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>IvAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IvLen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function validates the IV parameters for the specified AES engine mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">EngineMode</td><td>AES engine mode. </td></tr>
    <tr><td class="paramname">IvAddr</td><td>Address of buffer holding IV. </td></tr>
    <tr><td class="paramname">IvLen</td><td>Length of the IV in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS, if IV parameters are validated successfully.</li>
<li>XST_FAILURE, if IV parameters validation fails. </li>
</ul>
</dd></dl>
<p>IV Validation for respective AES engine modes AES Standard mode (ECB, CBC, CTR, CFB, OFB). AES MAC mode (GCM, CCM, GMAC, CMAC).</p>
<table class="doxtable">
<tr>
<th>Engine Mode </th><th>IvAddress </th><th>IvLength  </th></tr>
<tr>
<td>AES-ECB, AES-CMAC </td><td>N/A </td><td>N/A </td></tr>
<tr>
<td>AES-GCM </td><td>Non-zero </td><td>Any non-zero Length </td></tr>
<tr>
<td>AES-CCM </td><td>Non-zero </td><td>7 to 13 bytes </td></tr>
<tr>
<td>Remaining modes </td><td>Non-zero </td><td>12 or 16 Bytes </td></tr>
</table>

<p>References <a class="el" href="group__xasu__common__defs.html#ga7071dad46885918f563b8586e03d0a53">XASU_AES_CBC_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga9c54373e5e7981182e232f50596bb31a">XASU_AES_CCM_MAX_NONCE_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga13fe3c3756a86473b09f9809d02e87f4">XASU_AES_CCM_MIN_NONCE_LEN</a>, <a class="el" href="group__xasu__common__defs.html#ga30d8f9306c9e8a365a92247259db30db">XASU_AES_CCM_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga7627df9f2610f9793e186d2a63de5566">XASU_AES_CFB_MODE</a>, <a class="el" href="group__xasu__common__defs.html#gacc3bdb18dc3dd63126c7088ba676ada1">XASU_AES_CMAC_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga08289d4f73f990ee87b9afb70d4aae0a">XASU_AES_CTR_MODE</a>, <a class="el" href="group__xasu__common__defs.html#gaa368e66adb87155ac40aaae3ea1a3747">XASU_AES_ECB_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga266c9d8c0ac689bdb49cbb5cd0d293f9">XASU_AES_GCM_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga8ddad79fd000463b9b715b9e0f387d2e">XASU_AES_IV_SIZE_128BIT_IN_BYTES</a>, <a class="el" href="group__xasu__common__defs.html#ga2ee13c774f1393949629518f645785b8">XASU_AES_IV_SIZE_96BIT_IN_BYTES</a>, and <a class="el" href="group__xasu__common__defs.html#ga14f7e91db0d7babd5ab30699376c5565">XASU_AES_OFB_MODE</a>.</p>

<p>Referenced by <a class="el" href="group__xasu__aes__client__apis.html#ga48dae63bdd6476ad22853140b0b23e9a">XAsu_AesOperation()</a>.</p>

</div>
</div>
<a class="anchor" id="ga46d86db456797e1245906452022c98eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s32 XAsu_AesValidateTagParams </td>
          <td>(</td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>EngineMode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>TagAddr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>TagLen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API Validates the tag parameters for the specified AES engine mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">EngineMode</td><td>AES engine mode. </td></tr>
    <tr><td class="paramname">TagAddr</td><td>Address of the Input/Output Tag buffer. </td></tr>
    <tr><td class="paramname">TagLen</td><td>Length of the tag in bytes. It will be zero for all AES standard modes like, ECB, CBC, OFB, CFB, CTR</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS, if the tag parameters are successfully validated.</li>
<li>XST_FAILURE, if the tag parameters validation fails. </li>
</ul>
</dd></dl>
<p>Tag Validation for respective AES engine modes AES Standard mode (ECB, CBC, CTR, CFB, OFB). AES MAC mode (GCM, CCM, GMAC, CMAC).</p>
<table class="doxtable">
<tr>
<th>Engine Mode </th><th>TagAddress </th><th>TagLength  </th></tr>
<tr>
<td>Standard mode </td><td>N/A </td><td>N/A </td></tr>
<tr>
<td>AES-GCM, CMAC </td><td>Non-zero </td><td>8&lt;=TagLen&lt;=16 </td></tr>
<tr>
<td>AES-CCM </td><td>Non-zero </td><td>4,6,8,10,12,14,16 </td></tr>
</table>
<p>NIST recommends using a tag length of atleast 64 bits to provide adequate protection against guessing attacks.</p>

<p>References <a class="el" href="group__xasu__common__defs.html#ga7071dad46885918f563b8586e03d0a53">XASU_AES_CBC_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga30d8f9306c9e8a365a92247259db30db">XASU_AES_CCM_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga7627df9f2610f9793e186d2a63de5566">XASU_AES_CFB_MODE</a>, <a class="el" href="group__xasu__common__defs.html#gacc3bdb18dc3dd63126c7088ba676ada1">XASU_AES_CMAC_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga08289d4f73f990ee87b9afb70d4aae0a">XASU_AES_CTR_MODE</a>, <a class="el" href="group__xasu__common__defs.html#gaa368e66adb87155ac40aaae3ea1a3747">XASU_AES_ECB_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga75c74eecf55fdbf5459a465738fdadb5">XASU_AES_EVEN_MODULUS</a>, <a class="el" href="group__xasu__common__defs.html#ga266c9d8c0ac689bdb49cbb5cd0d293f9">XASU_AES_GCM_MODE</a>, <a class="el" href="group__xasu__common__defs.html#ga2b23227296edca13de1f3732e04cca19">XASU_AES_MAX_TAG_LENGTH_IN_BYTES</a>, <a class="el" href="group__xasu__common__defs.html#gaf02f2441da2bbfbcca832f01458c56ea">XASU_AES_MIN_TAG_LENGTH_IN_BYTES</a>, <a class="el" href="group__xasu__common__defs.html#ga14f7e91db0d7babd5ab30699376c5565">XASU_AES_OFB_MODE</a>, and <a class="el" href="group__xasu__common__defs.html#ga3a2c98f32f6ff7605629fdaeea0a3ee8">XASU_AES_RECOMMENDED_TAG_LENGTH_IN_BYTES</a>.</p>

<p>Referenced by <a class="el" href="group__xasu__aes__client__apis.html#ga48dae63bdd6476ad22853140b0b23e9a">XAsu_AesOperation()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
